Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #78, Split up multiple-variable declaration statements #79

Conversation

thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Mar 14, 2023

Checklist

Describe the contribution

Testing performed
GitHub CI actions (incl. Build + Run, Unit Tests etc.) all passing successfully.

Expected behavior changes
No change to behavior.
Eases future maintenance.

Contributor Info
Avi Weiss @thnkslprpt

@dzbaker dzbaker requested a review from jphickey May 25, 2023 18:22
@thnkslprpt thnkslprpt force-pushed the fix-78-split-up-multiple-variable-declaration-statements branch from ac13e7c to 7e33ad2 Compare June 1, 2023 22:06
@thnkslprpt thnkslprpt force-pushed the fix-78-split-up-multiple-variable-declaration-statements branch from 7e33ad2 to b50a3a7 Compare June 1, 2023 22:10
Copy link
Contributor

@jphickey jphickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example of a C guideline that backs this up can be found in JPL C coding standard for reliable software-- rule 24 states "There should be no more than one statement or variable declaration per line"

@dzbaker dzbaker merged commit 4362bcb into nasa:main Jun 5, 2023
@thnkslprpt
Copy link
Contributor Author

Example of a C guideline that backs this up can be found in JPL C coding standard for reliable software-- rule 24 states "There should be no more than one statement or variable declaration per line"

Yes @jphickey
Also in:
JSF++ AV Rule 152:
Multiple variable declarations shall not be allowed on the same line.
Rationale: Increases readability and prevents confusion.

NASA C Style Guide SEL-94-003 (probably out of date but I assume this rule didn't change)
Rule 5.4: Declare each internal variable on a separate line...

ESA C and C++ Coding Standards
Rule 46: Each declaration should start on its own line...
The rule means that the programmer always has the opportunity of adding or
removing declaration lines without having to modify other declarations...

SEI CERT C Coding Standard
DCL04-C. Do not declare more than one variable per declaration

@thnkslprpt thnkslprpt deleted the fix-78-split-up-multiple-variable-declaration-statements branch June 5, 2023 21:05
@dmknutsen dmknutsen added this to the Equuleus milestone Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split up decl. statements that define multiple variables on the same line
5 participants